package com.freesky.biz.activity.mapper;

import com.freesky.biz.activity.domain.TAssignCoupon;
import com.freesky.biz.activity.domain.TProject;
import com.freesky.biz.activity.domain.TProjectRelatedLog;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ProjectMapper {

    public TProject get(String id);

    public List<TProject> findList(TProject entity);

    public TProject selectSummaryData(TProject entity);

    public int insert(TProject entity);

    public int update(TProject entity);

    public int selectCouponCount(@Param("projectId") String projectId);

    public TProject selectProjectByName(@Param("name") String name);

    /**
     * 批量删除参数信息
     *
     * @param ids 需要删除的参数ID
     * @return 结果
     */
    public int deleteByIds(String[] ids);

    public int updateProjectRelatedLog(TProjectRelatedLog projectRelatedLog);

    public List<TAssignCoupon> selectCouponList(TAssignCoupon assignCoupon);

    public TAssignCoupon selectCouponById(@Param("couponId") String couponId);

    public int updateCouponRelatedProject(@Param("couponId") String couponId,
                                          @Param("projectId") String projectId);

    public int updateAlipayRelatedProject(@Param("couponId") String couponId,
                                          @Param("projectId") String projectId);

    //每天定时任务更新活动状态
    public int updateProjectStatus();
}
